module.exports =  class SyncWaterfallHook {
  constructor(args){
      this.tasks = []
  }
  tap(name,task){
   this.tasks.push(task)
  }
  call(...args){
    let [first,...other] = this.tasks
    let ret = first(...args)
    other.reduce((a,b)=>{
      return b(a) || ret
    },ret)
  }
}
